﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PFoodEdit.aspx.cs" Inherits="StoragePeriod.Web.FoodTesting.PFood.PFoodEdit" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Vc含量检测</title>
    <link href="/Styles/MainStyle.css" rel="stylesheet" type="text/css" />
    <link href="/Scripts/artDialog/skins/default.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <style type="text/css">
        .TitleTabs{ width:100%; height:25px; border-bottom:1px solid #3bb9f3; margin:0px auto; padding-top:10px;}
        .TitleTabs li{float:left; width:100px; height:25px; line-height:25px; margin-left:10px;}
        .TitleTabs li a{ display:block; width:100px; height:24px; line-height:24px; border:1px solid #3bb9f3; border-bottom:0px; text-align:center; background-color:#b9eefe; color:#000; font-weight:600;}
        .TitleTabs .TabsOver{border-bottom:1px solid #fff; background-color:#fff; color:#f90;}
        .Mean{ float:left; font-size:12px; font-weight:600; color:#f90;}
    </style>
    <script type="text/javascript">
        //验证控件是否为空
        function IsNotNull() {
            var b = true;
            if ($("#MainContent_txt_P").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V4").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_M").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V1").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V2").val() == "") {
                b = false;
            }
            if (!b) {
                alert("请完整输入参数。");
            }
            return b;
        }

        //根据检测次数 打开新窗体
        function OpenIframe(RawID, FoodTime, FoodNum) {
            window.location.href = 'PFoodEdit.aspx?RawID=' + RawID + "&FoodTime=" + FoodTime + "&FoodNum=" + FoodNum + "&rid=" + Math.random();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="TitleTabs">
        <ul>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="1"?"TabsOver":""%>" href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',1);">第一次检测</a></li>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="2"?"TabsOver":""%>" href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',2);">第二次检测</a></li>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="3"?"TabsOver":""%>" href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',3);">第三次检测</a></li>
        </ul>
    </div>
    <div style="width:670px; margin:0px auto;">
        <div style="padding-top:20px;">
            <table border="0" cellpadding="0" cellspacing="0" width="98%" style=" margin:0px auto;">
                <tr>
                    <td width="300px;">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td style="width:120px;" align="right">W（磷）:</td>
                                <td colspan="3"><asp:TextBox style="width:100px;" ID="txt_W" runat="server" Enabled="false" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="right">P:</td><td><asp:TextBox style="width:100px;" ID="txt_P" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                                <td align="right">V4:</td><td><asp:TextBox style="width:100px;" ID="txt_V4" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="right">M:</td><td><asp:TextBox style="width:100px;" ID="txt_M" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                                <td align="right">V1:</td><td><asp:TextBox style="width:100px;" ID="txt_V1" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="right">V2:</td>
                                <td colspan="3"><asp:TextBox style="width:100px;" ID="txt_V2" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top" style="padding-left:10px;">
                        说明:<br />
                        P:试样测定液显色体积，单位为毫克每升（mg/L）<br />
                        V4:式样测定液显色体积，单位为毫升（mL）<br />
                        V1:式样分解液定容体积，单位为毫升（mL）<br />
                        M:试样质量，单位为克（g）<br />
                        V2:测定用分取试样分解液体积，单位为毫升（mL）<br />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-bottom:20px;">
                        W计算公式:W=(P*V4)/M*V1/V2*10（负4次方）
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="aui_buttons">
            <div class="Mean">
                平均值：<asp:Label ID="labMean" runat="server" Text=""></asp:Label>
            </div>
            <asp:Button Text="提交" runat="server" CssClass="aui_state_highlight" ID="btPost" OnClientClick="return IsNotNull()" OnClick="btPost_Click"/>
            <asp:Button Text="计算平均值" runat="server" CssClass="aui_state_highlight" ID="btnMean" onclick="btnMean_Click" />
        </div>
    </form>
</body>
</html>
